<template>
  <el-dialog :title="title" :visible.sync="isShow" :width="width" @close="fn">
    <slot/>
  </el-dialog>
</template>
<script>
export default {
  props: {
    title: {
      type: String,
      default: '默认主题'
    },
    isShow: {
      type: Boolean,
      default: true
    },
    width: {
      type: String,
      default: '40%'
    }
  },
  methods: {
    fn() {
      this.$emit('close')
    },
    openDialog() {
      this.isShow = true
    },
    closeDialog() {
      this.isShow = false
    }
  }
}
</script>
